package com.best.util;

import java.util.Properties;

import org.springframework.beans.BeansException;
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
import org.springframework.beans.factory.config.PropertyPlaceholderConfigurer;

public class PropertyConfig extends PropertyPlaceholderConfigurer {

	private static Properties props;

	@Override
	protected void processProperties(ConfigurableListableBeanFactory beanFactoryToProcess, Properties props)
			throws BeansException {
		super.processProperties(beanFactoryToProcess, props);
		PropertyConfig.props = props;
	}

	// static method for accessing context properties
	public static Object getProperty(String name) {
		return props.getProperty(name);
	}
}